def validation_command_base(command):
    """
    校验命令的基本格式是否正确

    正确的命令格式：[命令名称]$[参数]

    :param command: 命令参数
    :return: 如果没有通过校验则返回false
    """

    command = str(command)

    if len(command) < 3:
        return False
    if len(command.split('$')) < 2:
        return False

    return True


def resolve_command(command: str):
    if not validation_command_base(command):
        return dict()
    command_set = command.split('$')

    command_name = command_set[0]
    command_param = command.replace(command_name+'$', '')

    return {'command_name': command_name,
            'command_param': command_param}

